package com.huangwenshuo.futurestarschoolmanagement.service.impl;

import com.huangwenshuo.futurestarschoolmanagement.pojo.dto.CoursewareDto;
import com.huangwenshuo.futurestarschoolmanagement.pojo.po.Folder;
import com.huangwenshuo.futurestarschoolmanagement.mapper.FolderMapper;
import com.huangwenshuo.futurestarschoolmanagement.pojo.vo.FoldersVO;
import com.huangwenshuo.futurestarschoolmanagement.service.FolderService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author huangwenshuo
 * @since 2021-03-07
 */
@Service
public class FolderServiceImpl extends ServiceImpl<FolderMapper, Folder> implements FolderService {

    @Autowired
    private FolderMapper folderMapper;

    @Override
    public List<FoldersVO> getFliesByUid(Integer uid) {
        List<FoldersVO> foldersVOS = folderMapper.getFliesByUid(uid);
        return foldersVOS;
    }

    @Override
    public void addFo(CoursewareDto.CPage page) {
        folderMapper.addFo(page);
    }
}
